#pragma once
#include "../sqlite/sqlite3.h"

#pragma comment( lib, "../sqlite/SQLite_static_lib.lib" )

class SQLiteManager
{
private:
	SQLiteManager(void);

	~SQLiteManager(void);

	static SQLiteManager singleton;

	sqlite3 * pSql;

private:
	// uncopyable
	void operator = ( const SQLiteManager& ){}
	SQLiteManager( const SQLiteManager& ){}

public:
	static SQLiteManager& instance()
	{
		return singleton;
	}

	operator sqlite3 * () const { return pSql; }
};

bool check_sql( int ret );

bool sql_exec( const std::string& s );